package com.example.javajetpacktest.ui;


import androidx.lifecycle.ViewModelProvider;
import com.example.javajetpacktest.base.BaseActivity;
import com.example.javajetpacktest.viewmodel.MainViewModel;
import com.example.javajetpacktest.R;
import com.example.javajetpacktest.databinding.ActivityMainBinding;


public class MainActivity extends BaseActivity<ActivityMainBinding> {

    private MainViewModel mainViewModel;

    @Override
    protected void initData() {

    }

    @Override
    public int setLayout() {
        return R.layout.activity_main;
    }

    @Override
    public void initViewModel() {
        mainViewModel = new ViewModelProvider(this, new ViewModelProvider.AndroidViewModelFactory(getApplication())).get(MainViewModel.class);
    }

    @Override
    public void setBingData(ActivityMainBinding bingData) {
        bingData.setViewModel(mainViewModel);
    }


}